Current Location: Home> Function Categories> checkdate

checkdate

Verify the Gregorian calendar date
Name:checkdate
Category:Date and time
Programming Language:php
One-line Description:Verify the Gregory date.

Definition and usage

checkdate() function is used to verify the Gregorian date.

Example

Check if some dates are valid Gregory dates:

 <?php
var_dump ( checkdate ( 12 , 31 , - 400 ) ) ;
echo "<br>" ;
var_dump ( checkdate ( 2 , 29 , 2003 ) ) ;
echo "<br>" ;
var_dump ( checkdate ( 2 , 29 , 2004 ) ) ;
?>

Try it yourself

grammar

 checkdate ( month , day , year ) ;
parameter describe
month Required. Specifies a numerical value from 1 to 12 months.
day Required. The specified date is a numerical value from 1 to 31.
year Required. Specifies a numerical value from 1 to 32767.
Similar Functions
Popular Articles